package com.lo.dao;

import com.lo.entity.Comment;
import com.lo.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CommentMapper {

    List<Comment> selectCommentsByCid(@Param("courseId") Long cid);

    Long insertComment(Comment comment);

    Long deleteById(@Param("id")Long id);

    //更新用户评论信息
//    Long updateUserNickname(@Param("userId") Long id,@Param("userNickname") String userNickname);

    Long updateUser2Teacher(@Param("userId") Long uid, @Param("teacherName") String teacherName);

    List<Comment> selectTextComments(@Param("textId") Long id);

    Long updateUserMessage(User user);
}
